package com.feiyi.app.utils;

import android.app.Activity;
import android.view.Window;
import android.view.WindowManager;

/**
 * @author wangliantao
 * @time 2018 11 2018/11/13 9:46 AM
 * @email 1346947404@qq.com
 * @package com.cn.trs.tlzj.utils
 * @describe： 控制屏幕亮度等的集合工具类
 * In me the tiger sniffs the rose
 */
public class WindowUtils {

    public static void setAlpha(Activity context, float alpha){
        Window window=context.getWindow();
        WindowManager.LayoutParams wl = window.getAttributes();
//        wl.flags=WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
        wl.alpha=alpha;   //这句就是设置窗口里崆件的透明度的．０.０全透明．１.０不透明．
        window.setAttributes(wl);

    }

}
